﻿CREATE PROCEDURE [acms].[PostControl_Delete]
	@Id int,
	@VersionId timestamp
AS
	if Exists (Select null FROM PostControl_View where Id = @Id) begin
		Update PostControls Set Deleted = 1 where Id = @Id and VersionId = @VersionId
		if @@rowcount <> 1
			return -100
		else
			return 0
	end
	else
		return -200
RETURN 0;